package com.itheima.consumer;

import com.itheima.pojo.Invocation;
import com.itheima.service.HelloService;

import java.io.IOException;


/**
 * @author 薛虎
 * @date 2021/1/23 13:48
 */
public class ConsumerMain {

    public static void main(String[] args) throws IOException {

        Invocation invocation = new Invocation(HelloService.class.getName(), "sayHello", new Object[]{"myRPC的客户端"}, new Class[]{String.class});

        HttpCilent httpClient = new HttpCilent();
        String localhost = httpClient.post("localhost", 8080, invocation);

        System.out.println(localhost);


    }

}
